<template>
  <img class="user_pic" :src="subCommentItem.userPicUrl==null?require('@/assets/img/avatar.png'):subCommentItem.userPicUrl" alt="">
  <div>
    <strong>{{ subCommentItem.userNickname }}</strong>
    <p style="padding-left:50px">{{ subCommentItem.commentContent }}</p>
    <span>
      <small>发布时间 : {{ date.getFullYear() + '年' + (date.getMonth() + 1) + '月' + date.getDate() + '日'}}</small>
    </span>
  </div>
  <br>
</template>
  
<script>
export default {
  props: {
    subCommentItem: Object,
  },
  data() {
    return {
      date: new Date(this.subCommentItem.commentDate)
    }
  },
}
</script>
  
<style scoped>
.user_pic {
  width: 30px;
  height: 30px;
  margin-right: 20px;
  border-radius: 50%;
  float: left;
}
</style>